Skip to content

[SET] SETBoundary#9107

Closed
bartlomiejbloniarz wants to merge 10 commits into
mainfrom
@bartlomiejbloniarz/set-boundary-2
Closed

[SET] SETBoundary#9107
bartlomiejbloniarz wants to merge 10 commits into
mainfrom
@bartlomiejbloniarz/set-boundary-2

Conversation

@bartlomiejbloniarz

Copy link
Copy Markdown
Member

Summary:

This PR introduces a new concept for SETs, called SharedTransitionBoundary. It is supposed to replace the current approach where we use Screens from RNScreens to separate which shared elements should be displayed. With the new approach one can still wrap a screen to get the old behavior, but also new patterns are available, such as running a SharedTransition within one RNScreen.

Main pros of this solution:

  • easier to adapt to different navigators (this allows us to use the TabNavigator with no weird native changes)
  • more customization options for users
  • no native dependency on RNScreens

Cons:

  • the minimal manual setup that has to be done to enroll a RNScreen in running transitions
  • we have to guess the target boundary when doing a native back gesture on iOS. This should not be a big problem for the usual use-case

Test Plan:

Screenless example

This PR introduces a new concept for SETs, called SharedTransitionBoundary. It is supposed to replace the current approach where we use Screens from RNScreens to separate which shared elements should be displayed. With the new approach one can still wrap a screen to get the old behavior, but also new patterns are available, such as running a SharedTransition within one RNScreen.

Main pros of this solution:
- easier to adapt to different navigators (this allows us to use the TabNavigator with no weird native changes)
- more customization options for users
- no native dependency on RNScreens

Cons:
- the minimal manual setup that has to be done to enroll a RNScreen in running transitions
- we have to guess the target boundary when doing a native back gesture on iOS. This should not be a big problem for the usual use-case

Screenless example

ghstack-source-id: 0464881
Pull Request resolved: #9036
@bartlomiejbloniarz bartlomiejbloniarz force-pushed the @bartlomiejbloniarz/set-boundary-2 branch from 155d84c to d46a639 Compare March 19, 2026 10:55
pull Bot pushed a commit to esinanturan/react-native-reanimated that referenced this pull request Jun 15, 2026
## Summary

This MR introduces `<SharedTransitionBoundary>`.
It cherrypicks commits from
software-mansion#9107
and
software-mansion#9132
and resolves conflicts.

Those MR are combined into one to keep main branch consistent.

NOTE: Found a non-deterministic bug on Android (check recording at
1:41). Not sure if this is a regression.

## Test plan

1. Check the new `[SET] Screenless Basic` example
2. Check `[SET] *` examples for regressions in FabricExample app on iOS
and on Android

## Attachments

### iOS after


https://github.com/user-attachments/assets/fa74bd0b-66b6-48c0-97d7-b17fb7b2f357

### Android after


https://github.com/user-attachments/assets/eef60cfe-53ff-46a5-ae4c-2557b275ae2e

---------

Co-authored-by: Bartłomiej Błoniarz <bartlomiej.bloniarz@swmansion.com>
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
Co-authored-by: Bartłomiej Błoniarz <bartlomiej.bloniarz@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant